package org.adream.account.dao;

import java.util.List;

import org.adream.account.entity.UserShippingAddressEntity;
import org.apache.ibatis.annotations.Param;

@BaseMybatisDao
public interface UserShippingAddressDao {
	
	int addAddress(UserShippingAddressEntity address);
	
	int deleteAddress(UserShippingAddressEntity address);
	
	int updateAddress(UserShippingAddressEntity address);
	
	int setDefaultAddress(UserShippingAddressEntity address);
	
	List<UserShippingAddressEntity> queryAddressesByDr(@Param("dr") Integer dr);
	
	List<UserShippingAddressEntity> queryAddressesByUidAndDr(@Param("uid") String uid,@Param("dr") Integer dr);
	
	UserShippingAddressEntity queryAddressByPkAndDr(@Param("uid") String uid,@Param("sort") String sort,@Param("dr") Integer dr);
	
	UserShippingAddressEntity queryDefaultAddress(@Param("uid") String uid, @Param("isDefaultAddress") Integer isDefaultAddress,@Param("dr") Integer dr);
	
	int replaceAddress(UserShippingAddressEntity address);
	
	int countAddressesByUidAndDr(@Param("uid") String uid, @Param("dr") Integer dr);
}